package zhr.chapter12.zuoye;

public class CityRunnable implements Runnable {
    private String cityName;

    public CityRunnable(String cityName) {
        this.cityName = cityName;
    }

    @Override
    public void run() {
        try {
            for (int i = 0; i < 10; i++) {
                System.out.println(cityName);
                Thread.sleep(500);
            }
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }
}

